package Odhgos_Polhs;


import java.util.Date;

public class Account {
    
    //Attributes
    private int ID;
    private String username;
    private String password;
    private Boolean IsAdmin;
    private Date dateCreated;
    
    private GenUser user; //Υλοποίηση σχέσης με GenUser
    
    //2 Constructors
    //1 με το χρήστη και 1 χωρίς
    public Account(int ID, String username, String password, Boolean IsAdmin, Date created) {
        this.ID = ID;
        this.username = username;
        this.password = password;
        this.IsAdmin = IsAdmin;
    }
    
    public Account(int ID, String username, String password, Boolean IsAdmin, Date created, GenUser user) {
        this.ID = ID;
        this.username = username;
        this.password = password;
        this.IsAdmin = IsAdmin;
        this.user = user;
    }
    
    // 1 Constructor χωρίς ID μόνο με username - password - isAdmin για το Login
    // added by chrisa
    public Account(String username, String password, Boolean IsAdmin) {
        this.username = username;
        this.password = password;
        this.IsAdmin = IsAdmin;
    }
    
    // 1 Constructor μόνο με username - password για το Login
    // added by dimitra
    public Account(String username, String password) {
        this.username = username;
        this.password = password;
    }
    
    
    //All Getters & Setters

    public long getID() {
        return ID;
    }

    public void setID(int ID) {
        this.ID = ID;
    }

    public Boolean getIsAdmin() {
        return IsAdmin;
    }

    public void setIsAdmin(Boolean IsAdmin) {
        this.IsAdmin = IsAdmin;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public GenUser getUser() {
        return user;
    }

    public void setUser(GenUser user) {
        this.user = user;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public Date getDateCreated() {
        return dateCreated;
    }

    public void setDateCreated(Date dateCreated) {
        this.dateCreated = dateCreated;
    }
    
    
}// End Class Account
